package com.team.bus.module.menu.model;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import com.team.bus.module.organization.model.Organization;
import com.team.bus.module.role.model.Role;

@Entity
@Table(name = "t_wsmenu")
public class Wsmenu implements java.io.Serializable {

	private static final long serialVersionUID = -3319899811823116199L;
	private String id;
	private Wsmenu menu;
	private String text;
	private String iconcls;
	private String url;
	private int orderno;
	private Set<Wsmenu> menus = new HashSet<Wsmenu>(0);
	private String case_id;
	private String form_id;
	private String formtype;
	private String createtime;
	private String printurl;
	private String save_doc_url;
	private String img_url;
	private String upstatus;
	private int finalorderno;


	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(name = "id", unique = true, nullable = false, length = 50)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "pid")
	public Wsmenu getMenu() {
		return this.menu;
	}

	public void setMenu(Wsmenu menu) {
		this.menu = menu;
	}

	@Column(name = "text", length = 500)
	public String getText() {
		return this.text;
	}

	public void setText(String text) {
		this.text = text;
	}

	@Column(name = "iconcls", length = 50)
	public String getIconcls() {
		return this.iconcls;
	}

	public void setIconcls(String iconcls) {
		this.iconcls = iconcls;
	}

	@Column(name = "url", length = 600)
	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "menu")
	public Set<Wsmenu> getMenus() {
		return this.menus;
	}

	
	public void setMenus(Set<Wsmenu> menus) {
		this.menus = menus;
	}

	@Column(name = "orderno")
	public int getOrderno() {
		return orderno;
	}

	public void setOrderno(int orderno) {
		this.orderno = orderno;
	}

	@Column(name = "case_id")
	public String getCase_id() {
		return case_id;
	}

	public void setCase_id(String case_id) {
		this.case_id = case_id;
	}

	@Column(name = "form_id")
	public String getForm_id() {
		return form_id;
	}

	public void setForm_id(String form_id) {
		this.form_id = form_id;
	}

	@Column(name = "formtype")
	public String getFormtype() {
		return formtype;
	}

	public void setFormtype(String formtype) {
		this.formtype = formtype;
	}

	@Column(name = "createtime")
	public String getCreatetime() {
		return createtime;
	}

	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}

	@Column(name = "printurl")
	public String getPrinturl() {
		return printurl;
	}

	public void setPrinturl(String printurl) {
		this.printurl = printurl;
	}

	@Column(name = "save_doc_url",length = 300)
	public String getSave_doc_url() {
		return save_doc_url;
	}

	public void setSave_doc_url(String save_doc_url) {
		this.save_doc_url = save_doc_url;
	}

	@Column(name = "img_url",length = 300)
	public String getImg_url() {
		return img_url;
	}

	public void setImg_url(String img_url) {
		this.img_url = img_url;
	}

	@Column(name = "upstatus",length = 50)
	public String getUpstatus() {
		return upstatus;
	}

	public void setUpstatus(String upstatus) {
		this.upstatus = upstatus;
	}


	@Column(name = "finalorderno")
	public int getFinalorderno() {
		return finalorderno;
	}

	public void setFinalorderno(int finalorderno) {
		this.finalorderno = finalorderno;
	}
}